gh-142392: Update ExceptionGroups in docs to use a tuple of errors where possible#142393
gh-142392: Update ExceptionGroups in docs to use a tuple of errors where possible#142393dr-carlos wants to merge 1 commit intopython:mainfrom
ExceptionGroups in docs to use a tuple of errors where possible#142393Conversation
…ions instead of a static list
|
Was it discussed in the PR and deemed a better way alternative? I personally prefer using |
It certainly isn't vastly superior, just slightly more efficient. @iritkatriel asked me to open an issue to update the docs, so I opened an issue and PR for it since there aren't many changes. When you run |
|
Yes it could be expensive but exception handlers are usually rare paths, so performance usually aren't an issue here. Unless you have a list of millions of exception objects, it doesn't really matter IMO. |
|
I agree it's not a significant perf impact. My point is it's inconsistent to recommend in the docs to use tuples and then have examples using []. |
|
@picnixz @iritkatriel Any further thoughts on this? |
This should skip news. Thanks!
ExceptionGroups to use a tuple of errors where possible #142392📚 Documentation preview 📚: https://cpython-previews--142393.org.readthedocs.build/